﻿using System.Collections.Generic;
using X.PagedList;

namespace Zapi.Model
{
    public class PagedOut<T> : BaseOut
    {      /// <summary>
           /// 分页数组,包块分页对象
           /// </summary>
           /// <param name="pagedList">显示数组</param> 
        public PagedOut(IPagedList<T> pagedList)
        { 
            PagedCount = pagedList.PageCount;
            TotalItemCount = pagedList.TotalItemCount;
            this.List = pagedList;
        }
        public PagedOut(IEnumerable<T> list,int pageCount,int totalItemCount)
        { 
            PagedCount = pageCount;
            TotalItemCount = totalItemCount;
            this.List = list;
        }

        public PagedOut()
        {
            
        }
        /// <summary>
        /// 分页数据
        /// </summary> 
        public IEnumerable<T> List { get;   set; }

        /// <summary>
        /// 分页数据
        /// </summary> 
        public int PagedCount { get;   set; }

        /// <summary>
        /// 分页数据
        /// </summary> 
        public int TotalItemCount { get;   set; }
    }
}